<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>PowerVR SDK</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
<table width="100%">
  <tr>
    <td width="33%">
      <p align="left">&nbsp;<a href="http://www.imgtec.com"><img border="0" src="IMGLogo.jpg" width="200" height="30"></a></p>
    </td>
    <td width="33%">
      <p align="center"><font color="#808080" face="Arial" size="2">PowerVR Software Development Kit</a></font></p>
    </td>
    <td width="34%">
      <p align="right"><a href="http://www.powervr.com"><img border="0" src="PVRlogo.jpg" width="200" height="27"></a></p>
    </td>
  </tr>
</table>
<hr>
</head><body>
<!-- Generated by Doxygen 1.3.6 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="namespacemembers.html">Namespace&nbsp;Members</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>
<h1>ConsoleLog.h</h1><a href="ConsoleLog_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">/******************************************************************************</span>
00002 <span class="comment"></span>
00003 <span class="comment"> @File         ConsoleLog.h</span>
00004 <span class="comment"></span>
00005 <span class="comment"> @Title        Console Log</span>
00006 <span class="comment"></span>
00007 <span class="comment"> @Version      </span>
00008 <span class="comment"></span>
00009 <span class="comment"> @Copyright    Copyright (C)  Imagination Technologies Limited.</span>
00010 <span class="comment"></span>
00011 <span class="comment"> @Platform     Independent</span>
00012 <span class="comment"></span>
00013 <span class="comment"> @Description  A Class for storing output from the PVREngine and apps that use</span>
00014 <span class="comment">               the engine</span>
00015 <span class="comment"></span>
00016 <span class="comment">******************************************************************************/</span>
00017 
00018 <span class="preprocessor">#ifndef CONSOLELOG_H</span>
00019 <span class="preprocessor"></span><span class="preprocessor">#define CONSOLELOG_H</span>
00020 <span class="preprocessor"></span>
00021 <span class="comment">/******************************************************************************</span>
00022 <span class="comment">Includes</span>
00023 <span class="comment">******************************************************************************/</span>
00024 
00025 <span class="preprocessor">#include "PVRTools.h"</span>
00026 <span class="preprocessor">#include "PVRTSingleton.h"</span>
00027 <span class="preprocessor">#include "<a class="code" href="dynamicArray_8h.html">dynamicArray.h</a>"</span>
00028 
00029 <span class="keyword">namespace </span>pvrengine
00030 {
00031     <span class="comment">/*!***************************************************************************</span>
00032 <span class="comment">     * @Class ConsoleLog</span>
00033 <span class="comment">     * @Brief A Class for storing output from the PVREngine and apps that use the engine.</span>
00034 <span class="comment">     * @Description A Class for storing output from the PVREngine and apps that use the engine.</span>
00035 <span class="comment">     *****************************************************************************/</span>
00036     <span class="keyword">class </span>ConsoleLog : <span class="keyword">public</span> CPVRTSingleton&lt;ConsoleLog&gt;
<a name="l00037"></a><a class="code" href="classpvrengine_1_1ConsoleLog.html">00037</a>     {
00038     <span class="keyword">public</span>:
00039         <span class="comment">/*!***************************************************************************</span>
00040 <span class="comment">        @Function           ConsoleLog</span>
00041 <span class="comment">        @Description        Constructor.</span>
00042 <span class="comment">        *****************************************************************************/</span>
00043         <a class="code" href="classpvrengine_1_1ConsoleLog.html#a0">ConsoleLog</a>();
00044 
00045         <span class="comment">/*!***************************************************************************</span>
00046 <span class="comment">        @Function           ~ConsoleLog</span>
00047 <span class="comment">        @Description        Destructor.</span>
00048 <span class="comment">        *****************************************************************************/</span>
00049         <a class="code" href="classpvrengine_1_1ConsoleLog.html#a1">~ConsoleLog</a>();
00050 
00051         <span class="comment">/*!***************************************************************************</span>
00052 <span class="comment">        @Function           log</span>
00053 <span class="comment">        @Input              pszFormat   a formatted string</span>
00054 <span class="comment">        @Description        main function to actually add to the log. Uses same format</span>
00055 <span class="comment">        as printf.</span>
00056 <span class="comment">        *****************************************************************************/</span>
00057         <span class="keywordtype">void</span> <a class="code" href="classpvrengine_1_1ConsoleLog.html#a2">log</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* pszFormat, ...);
00058 
00059         <span class="comment">/*!***************************************************************************</span>
00060 <span class="comment">        @Function           log</span>
00061 <span class="comment">        @Input              sString a string</span>
00062 <span class="comment">        @Description        another function to actually add to the log.</span>
00063 <span class="comment">        *****************************************************************************/</span>
00064         <span class="keywordtype">void</span> <a class="code" href="classpvrengine_1_1ConsoleLog.html#a2">log</a>(<span class="keyword">const</span> CPVRTString&amp; sString);
00065 
00066         <span class="comment">/*!***************************************************************************</span>
00067 <span class="comment">        @Function           setOutputFile</span>
00068 <span class="comment">        @Input              strLogFile  logfile path</span>
00069 <span class="comment">        @Return             bool success</span>
00070 <span class="comment">        @Description        sets the path to the output file.</span>
00071 <span class="comment">        *****************************************************************************/</span>
00072         <span class="keywordtype">bool</span> <a class="code" href="classpvrengine_1_1ConsoleLog.html#a4">setOutputFile</a>(<span class="keyword">const</span> CPVRTString strLogFile);
00073 
00074         <span class="comment">/*!***************************************************************************</span>
00075 <span class="comment">        @Function           setStraightToFile</span>
00076 <span class="comment">        @Input              bStraightToFile bool</span>
00077 <span class="comment">        @Description        sets whether the log writes straight to its logfile.</span>
00078 <span class="comment">        *****************************************************************************/</span>
00079         <span class="keywordtype">void</span> <a class="code" href="classpvrengine_1_1ConsoleLog.html#a5">setStraightToFile</a>(<span class="keywordtype">bool</span> bStraightToFile);
00080 
00081         <span class="comment">/*!***************************************************************************</span>
00082 <span class="comment">        @Function           getStraightToFile</span>
00083 <span class="comment">        @Return             bool success</span>
00084 <span class="comment">        @Description        gets whether the log is writing straight to file or not</span>
00085 <span class="comment">        *****************************************************************************/</span>
00086         <span class="keywordtype">bool</span> <a class="code" href="classpvrengine_1_1ConsoleLog.html#a6">getStraightToFile</a>();
00087 
00088         <span class="comment">/*!***************************************************************************</span>
00089 <span class="comment">        @Function           getLog</span>
00090 <span class="comment">        @Return             dynamic array of log's contents</span>
00091 <span class="comment">        @Description        retrieves the entire existing log</span>
00092 <span class="comment">        *****************************************************************************/</span>
00093         <a class="code" href="classdynamicArray.html">dynamicArray&lt;CPVRTString&gt;</a> <a class="code" href="classpvrengine_1_1ConsoleLog.html#a7">getLog</a>();
00094 
00095         <span class="comment">/*!***************************************************************************</span>
00096 <span class="comment">        @Function           getLastLogLine</span>
00097 <span class="comment">        @Return         CPVRTString of last line</span>
00098 <span class="comment">        @Description        retrieves the last line from log</span>
00099 <span class="comment">        *****************************************************************************/</span>
00100         CPVRTString <a class="code" href="classpvrengine_1_1ConsoleLog.html#a8">getLastLogLine</a>();
00101 
00102         <span class="comment">/*!***************************************************************************</span>
00103 <span class="comment">        @Function           writeToFile</span>
00104 <span class="comment">        @Return             bool success</span>
00105 <span class="comment">        @Description        writes the entire current log to the specified file</span>
00106 <span class="comment">        overwriting the existing file</span>
00107 <span class="comment">        *****************************************************************************/</span>
00108         <span class="keywordtype">bool</span> <a class="code" href="classpvrengine_1_1ConsoleLog.html#a9">writeToFile</a>();
00109 
00110         <span class="comment">/*!***************************************************************************</span>
00111 <span class="comment">        @Function           appendToFile</span>
00112 <span class="comment">        @Return             bool success</span>
00113 <span class="comment">        @Description        appends the entire current log to the specified file</span>
00114 <span class="comment">        *****************************************************************************/</span>
00115         <span class="keywordtype">bool</span> <a class="code" href="classpvrengine_1_1ConsoleLog.html#a10">appendToFile</a>();
00116 
00117         <span class="comment">/*!***************************************************************************</span>
00118 <span class="comment">        @Function           clearLog</span>
00119 <span class="comment">        @Description        clears the log in memory</span>
00120 <span class="comment">        *****************************************************************************/</span>
00121         <span class="keywordtype">void</span> <a class="code" href="classpvrengine_1_1ConsoleLog.html#a11">clearLog</a>();
00122 
00123     <span class="keyword">private</span>:
00124         <span class="comment">/****************************************************************************</span>
00125 <span class="comment">        ** Variables</span>
00126 <span class="comment">        ****************************************************************************/</span>
00128         CPVRTString m_strLogFile;
00130         <a class="code" href="classdynamicArray.html">dynamicArray&lt;CPVRTString&gt;</a>   m_daLog;
00132         <span class="keywordtype">bool</span>    m_bStraightToFile;
00134         FILE*   m_LogFile;
00135 
00136     };
00137 
00138 }
00139 
00140 <span class="preprocessor">#endif // CONSOLELOG_H</span>
00141 <span class="preprocessor"></span>
00142 <span class="comment">/******************************************************************************</span>
00143 <span class="comment">End of file (ConsoleLog.h)</span>
00144 <span class="comment">******************************************************************************/</span>
00145 
</pre></div><br>
<br>
<P align=left><FONT size=2><STRONG><A 
   href="http://www.imgtec.com/powervr/insider/legal/index.asp">Copyright</A> � 
   1999-2008, Imagination Technologies Ltd.</STRONG></FONT></P>
<hr>
<address style="align: left;"><small><FONT color=f0f>
Generated by <a href="http://www.doxygen.org/index.html">DOXYGEN</a> 1.3.6</small></address>
</body>
</html>
